package com.lzx.dormsys.service.impl;

import java.util.List;

import com.lzx.dormsys.bean.DeviceBean;
import com.lzx.dormsys.mapper.DeviceBeanMapper;
import com.lzx.dormsys.service.IDmsDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;



/**
 * dmsService业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-09
 */
@Service
public class DmsDeviceServiceImpl implements IDmsDeviceService
{
    @Autowired
    private DeviceBeanMapper deviceBeanMapper;

    /**
     * 查询dms
     * 
     * @param deviceId dmsID
     * @return dms
     */
    @Override
    public DeviceBean selectDmsDeviceById(Long deviceId)
    {
        return deviceBeanMapper.selectDmsDeviceById(deviceId);
    }

    /**
     * 查询dms列表
     * 
     * @param deviceBean dms
     * @return dms
     */
    @Override
    public List<DeviceBean> selectDmsDeviceList(DeviceBean deviceBean)
    {
        return deviceBeanMapper.selectDmsDeviceList(deviceBean);
    }

    /**
     * 新增dms
     * 
     * @param deviceBean dms
     * @return 结果
     */
    @Override
    public int insertDmsDevice(DeviceBean deviceBean)
    {
        return deviceBeanMapper.insertDmsDevice(deviceBean);
    }

    /**
     * 修改dms
     * 
     * @param deviceBean dms
     * @return 结果
     */
    @Override
    public int updateDmsDevice(DeviceBean deviceBean)
    {
        return deviceBeanMapper.updateDmsDevice(deviceBean);
    }

    /**
     * 批量删除dms
     * 
     * @param deviceIds 需要删除的dmsID
     * @return 结果
     */
    @Override
    public int deleteDmsDeviceByIds(Long[] deviceIds)
    {
        return deviceBeanMapper.deleteDmsDeviceByIds(deviceIds);
    }

    /**
     * 删除dms信息
     * 
     * @param deviceId dmsID
     * @return 结果
     */
    @Override
    public int deleteDmsDeviceById(Long deviceId)
    {
        return deviceBeanMapper.deleteDmsDeviceById(deviceId);
    }
}
